/**
 * @author lulongwen
 * Date: 2023-08-06 22:39
 * Description:
 */

export const BackgroundSchema = {
  type: 'object',
  properties: {
    variant: {
      title: '背景网格',
      'x-decorator': 'FormItem',
      'x-component': 'Select',
      'x-validator': [],
      'x-component-props': {
        popupClassName: '__small__',
      },
      'x-decorator-props': {},
      enum: [
        { label: '点', value: 'dots' },
        { label: '网格', value: 'lines' },
        { label: '十字星', value: 'cross' },
      ],
      name: 'variant',
      'x-designable-id': 'k1zsfo9w831',
      'x-index': 0,
    },
    gap: {
      type: 'number',
      title: '网格间距',
      'x-decorator': 'FormItem',
      'x-component': 'NumberPicker',
      'x-validator': [],
      'x-component-props': {},
      'x-decorator-props': {},
      name: 'gap',
      'x-designable-id': 'pafp57gg596',
      'x-index': 1,
    },
    size: {
      type: 'number',
      title: '网格大小',
      'x-decorator': 'FormItem',
      'x-component': 'NumberPicker',
      'x-validator': [],
      'x-component-props': {},
      'x-decorator-props': {},
      name: 'size',
      'x-designable-id': 'mfehhj4kdo0',
      'x-index': 2,
      'x-reactions': {
        dependencies: [
          {
            property: 'value',
            type: 'any',
            source: 'variant',
            name: 'variant',
          },
        ],
        fulfill: {
          state: {
            initialValue: '{{$deps.variant === \'cross\' ? 6 : 1}}',
          },
        },
      },
    },
    offset: {
      type: 'number',
      title: '偏移',
      'x-decorator': 'FormItem',
      'x-component': 'NumberPicker',
      'x-validator': [],
      'x-component-props': {},
      'x-decorator-props': {},
      name: 'offset',
      'x-designable-id': 'wrwvbiss15o',
      'x-index': 3,
    },
    lineWidth: {
      type: 'number',
      title: '线条宽度',
      'x-decorator': 'FormItem',
      'x-component': 'NumberPicker',
      'x-validator': [],
      'x-component-props': {},
      'x-decorator-props': {},
      name: 'lineWidth',
      'x-designable-id': 'fwyk42xp4vp',
      'x-index': 4,
    },
    color: {
      type: 'string',
      title: '图案颜色',
      'x-decorator': 'FormItem',
      'x-component': 'ColorPicker',
      'x-validator': [],
      'x-component-props': {
        "showText": true
      },
      'x-decorator-props': {},
      name: 'color',
      'x-designable-id': 'h48lbxyk9k0',
      'x-index': 5,
    },
    className: {
      type: 'string',
      title: 'className',
      'x-decorator': 'FormItem',
      'x-component': 'Input',
      'x-validator': [],
      'x-component-props': {},
      'x-decorator-props': {},
      name: 'className',
      'x-designable-id': 'jkf9m5env5o',
      'x-index': 6,
    },

    "style": {
      "type": "object",
      "x-validator": [],
      "x-designable-id": "q0v3pgyey1c",
      "x-index": 1,
      "title": "行内样式",
      "name": "style",
      "properties": {
        "backgroundColor": {
          "type": "string",
          "title": "背景颜色",
          "x-decorator": "FormItem",
          "x-component": "ColorPicker",
          "x-validator": [],
          "x-component-props": {
            "showText": true
          },
          "x-decorator-props": {},
          "name": "backgroundColor",
          "x-designable-id": "mzvcy25xuwj",
          "x-index": 0
        }
      }
    }
  },
  'x-designable-id': 'bbyc1pvqpj1',
};


